-
Notifications
You must be signed in to change notification settings - Fork 942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
don't set autoresizing mask on ios as that's not supported #6535
Conversation
great find, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah damn, I think I relied on testing on Mac Catalyst a little bit too much, and then only tested previous iterations (but not the final PR) in the simulator - sorry!
@madsmtm do you think we need to do something else on iOS instead?
The details are a bit out of my cache here, but yes, we should be doing something different on iOS - but that's what #6210 is for.
In total, with #6107 and this PR, we're not worse off regarding resizing on iOS (it didn't work before). So 👍 from me.
Co-authored-by: Mads Marquart <[email protected]>
Backported to v23 here without PR 78fbdfc |
Connections
bevyengine/bevy#16363
Description
After updating to wgpu 23, Bevy crashes on iOS with
fatal runtime error: Rust cannot catch foreign exceptions
This started with #6107
By adding logging between all lines of code in the
get_metal_layer
, it came fromwgpu/wgpu-hal/src/metal/surface.rs
Line 226 in ae6c6fb
new_layer is a
CAMetalLayer
which is available on iOS https://developer.apple.com/documentation/quartzcore/cametallayerbut
autoresizingMask
is only available on macOS https://developer.apple.com/documentation/quartzcore/calayer/1410877-autoresizingmaskthis PR stops setting the
autoresizingMask
on iOSTesting
I tested the same fix on the 23 tag with Bevy and it works
Checklist
cargo fmt
.taplo format
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.